﻿<?xml version="1.0" encoding="utf-8" ?>
<SourceAnalyzer Name="Jeff LeBert Refactoring Rules">
  <Description>
    Rules that find simple refactorings.
  </Description>
  <Rules>
    <Rule Name="DontCompareToBooleanConstant" CheckId="JS1002">
      <Context>Don't compare a boolean to boolean constants.</Context>
      <Description>It is confusing to compare boolean values to boolean constants.</Description>
    </Rule>
    <Rule Name="LocalVariableAssignmentUnused" CheckId="JS1001">
      <Context>The variable '{0}' assignment isn't used or is overwritten before it is used.</Context>
      <Description>The variable is assigned but its value is overwritten before it is used.</Description>
    </Rule>
    <Rule Name="LocalVariablesShouldBeSetWhereTheyAreDeclared" CheckId="JS1000">
      <Context>The variable '{0}' should be set in its declaration.</Context>
      <Description>Validates that local variables are initialized as soon as possible.</Description>
    </Rule>
    <Rule Name="MoveVariableDeclarationToUsageLevel" CheckId="JS1003">
      <Context>The '{0}' variable declaration should be moved to the code block where it is used. The code block starts at line {1}.</Context>
      <Description>If a variable is only used in a specific code block then it's declaration should be moved into that block.</Description>
    </Rule>
  </Rules>
</SourceAnalyzer>